home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 May / MacHome CD (May 2001).iso / mac / Stuff / Software / Graphic / iView Multimedia 3.8.6 / AppleScript Support / iView-FileMaker scripts < prev    next >
Encoding:
Text File  |  1999-12-20  |  1.3 KB  |  55 lines  |  [TEXT/ToyS]

  1. ----
  2. import()
  3. ----
  4.  
  5. ------
  6. on import()
  7.     -- loop on all items
  8.     repeat with i from 1 to 16
  9.         tell application "FileMaker Pro"
  10.             tell window 1
  11.                 set mediaAuthor to cell "Author" of record i
  12.             end tell
  13.         end tell
  14.         tell application "iView Multimedia 3.7.1"
  15.             tell window 1
  16.                 set the annotations of object i to {writer:mediaAuthor}
  17.             end tell
  18.         end tell
  19.     end repeat
  20. end import
  21.  
  22. -----
  23. on export()
  24.     
  25.     tell application "iView Multimedia 3.7.1"
  26.         set numItems to the count of objects of window 1
  27.     end tell
  28.     
  29.     -- loop on all items
  30.     repeat with i from 1 to 16
  31.         
  32.         tell application "iView Multimedia 3.7.1"
  33.             tell window 1
  34.                 set mediaName to the name of object i as text
  35.                 set mediaAnno to the annotations of object i
  36.                 set mediaCaption to the caption of mediaAnno as text
  37.                 set mediaAuthor to the writer of mediaAnno as text
  38.                 set mediaHeadline to the headline of mediaAnno as text
  39.             end tell
  40.         end tell
  41.         
  42.         tell application "FileMaker Pro"
  43.             tell window 1
  44.                 set record i to {mediaName, mediaCaption, mediaAuthor, mediaHeadline}
  45.                 -- alternative, but much slower
  46.                 -- set cell "name" of record i to mediaName
  47.                 -- set cell "Caption" of record i to mediaCaption
  48.                 -- set cell "Author" of record i to mediaAuthor
  49.                 -- set cell "Headline" of record i to mediaHeadline
  50.             end tell
  51.         end tell
  52.         
  53.     end repeat
  54.     
  55. end export